import * as types from '../actions/types'
import createReducer from './createReducer'

const initial = {
	showFeedback: false,
	recomms: [],
	message: {
		visiable: false,
		content: ''
	}
}

export const site = createReducer(initial,{
	[types.SET_SHOW_FEEDBACK](state, action){
		return Object.assign({}, state, {showFeedback: action.showFeedback})
	},
	[types.SET_RECOMMS](state, action){
		return Object.assign({}, state, {recomms: action.recomms})
	},
	[types.SHOW_MESSAGE](state, action) {
		return Object.assign({}, state, {message: action.message})
	}
})

